package com.houda.cn.mian;

import android.Manifest;
import android.os.Bundle;

import com.houda.cn.R;
import com.houda.cn.utils.AppManager;

import java.util.ArrayList;

/**
 * 作者: 赵航
 * 创建时间: 2018/10/10 15:15
 * 描述:
 */
public abstract class BasicActivity extends BasicAllActivity {

    private String[]          permissionss = new String[]{
            Manifest.permission.CAMERA,
            Manifest.permission.WRITE_EXTERNAL_STORAGE,
            Manifest.permission.READ_EXTERNAL_STORAGE,
            Manifest.permission.ACCESS_COARSE_LOCATION,
    };
    private ArrayList<Object> mPermissionList;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_basic);

        //添加到栈中,将所有的Activity到集合当中
        AppManager.getInstance().addActivity(this);

        //获取6.0权限
        getListPermissions(permissionss);
    }

    private void getListPermissions(String[] permissionss) {
        // 声明一个集合，在后面的代码中用来存储用户拒绝授权的权
        if (mPermissionList == null) {
            mPermissionList = new ArrayList<>();
        } else {
            mPermissionList.clear();
        }
    }
}
